Skip to content

Instantly share code, notes, and snippets.

"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@joseluisq
joseluisq / resize_disk_image.md
Last active March 15, 2026 18:34
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

@brucebentley
brucebentley / iOS Shortcuts Catalog.md
Last active March 15, 2026 18:34
This is a public resource designed to help people get started with Siri Shortcuts & the Shortcuts app. It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Bruce's iOS Shortcut Catalog

Hello and welcome to my Shortcuts Catalog!

This is a public resource designed to help people get started with Siri Shortcuts and the Shortcuts app.

It’s made up of the Shortcuts Library, a collection of over 125+ shortcuts grouped into folders, and the Action Directory, a documentation of 125+ of the actions in the Shortcuts app used to build shortcuts.

Enjoy!

Uninstall Microsoft Edge

Important

Working on the latest supported Windows versions. Run Windows Update before following this guide.

1. Open Powershell > RUN AS ADMIN

2. Paste in irm https://gist.github.com/ave9858/c3451d9f452389ac7607c99d45edecc6/raw/UninstallEdge.ps1 | iex and press enter

3. Microsoft Edge will be completely uninstalled.

@bartowski1182
bartowski1182 / calibration_datav5.txt
Created January 2, 2026 01:29
Calibration data used for latest imatrix. Includes work from Dampf, Kalomaze, and extra dataset from combined_all_small from edaddario
This file has been truncated, but you can view the full file.
In addition to a significant decrease in hepatic lipid accumulation in the IOE group, which inhibited energy intake by propionate enrichment, hepatic lipids were also significantly reduced in the mice in the IOP group, which was largely enriched with butyrate. Compared with the IOE group, IOP had a stronger regulatory effect on hepatic metabolism and triglyceride metabolism and higher levels of TCA cycle in the host. In addition, butyrate has the ability to promote browning of white adipose tissue (WAT) to brown adipose tissue (BAT).^[@ref39],[@ref40]^ WAT stores energy, whereas BAT uses energy for heating and consequently host energy expenditure increases.^[@ref41],[@ref42]^ However, adipose tissue weight does not change after WAT browning.^[@ref43]^ Therefore, the weight of adipose tissue of mice in the IOP group dominated by butyrate was greater than that of the mice in the IOE group dominated by propionate.
@amirrajan
amirrajan / main.rb
Last active March 15, 2026 18:32
DragonRuby Game Toolkit - Circular Viewport/Minimap
def boot args
args.state = {}
end
def tick args
args.outputs.background_color = [30, 30, 30]
args.state.player ||= {
x: 640 - 32,
y: 360 - 32,
w: 64,
@bradtraversy
bradtraversy / terminal-commands.md
Last active March 15, 2026 18:32
Common Terminal Commands

Common Terminal Commands

Key Commands & Navigation

Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:

  • Up Arrow: Will show your last command
  • Down Arrow: Will show your next command
  • Tab: Will auto-complete your command
  • Ctrl + L: Will clear the screen
@andy-cooper
andy-cooper / moes-ws-b-us-2-gang-wifi-switch-esphome.yaml
Created February 11, 2024 02:55
MOES WS-B-US 2-gang WiFi switch - ESPHome YAML configuration
# Before you wonder if there's actually YAML here, yes there is - but I also wanted to include as much of a
# complete guide to getting ESPHome onto the Tuya CBU found in this switch and configuring it for use in a home,
# because there was absolutely zero good documentation on this and I had to work a lot by trial and error.
#
# The MOES WS-B-US switch - https://www.amazon.com/gp/product/B0C3HGGYHG/ - uses a Tuya CBU processor which is
# very similar to the ESP8266 chip, but does not work out of the box with ESPHome, and with current levels of
# firmware from Tuya, tuya-convert and any other OTA attack fails. That means that you need to open the switch
# up and flash in a different firmware via serial connection, achieved most easily via a USB-to-Serial / TTL
# board like this one at Amazon - https://www.amazon.com/dp/B075N82CDL. It's important to note you want a board
# that has a stable voltage regulation. This one appears to have that, and has a switch to specify either 5V or 3V3.

P2P Ridehailing App — Claude Code Instructions

You are building a fully decentralized peer-to-peer ridehailing mobile app. Zero centralized servers. The entire system runs on user devices and the Solana blockchain.

Core Flow

  1. A rider opens the app, sets a destination, and the app calculates a fare client-side using Haversine distance.
  2. The rider posts a ride request on-chain containing a blinded zone ID (ZK proof of zone membership), the offered fare, and escrowed SOL.
  3. Nearby drivers discover the request via libp2p GossipSub and on-chain queries.
  4. Drivers submit offers on-chain — they can accept the rider's fare or counter-offer (capped at 2x the rider's price).
@alserom
alserom / poe-dust.csv
Last active March 15, 2026 18:29
POE 3.25 Kingsmarch - Unique items list for disenchanting
name baseType dustVal dustValIlvl84 dustValIlvl84Q20 dustPerSlot w h slots link
Original Sin Amethyst Ring 1128.890000 2257780 2709336 2257780 1 1 1 https://poedb.tw/us/Original_Sin
Headhunter Leather Belt 891.160000 1782320 2138784 891160 2 1 2 https://poedb.tw/us/Headhunter
Mageblood Heavy Belt 891.160000 1782320 2138784 891160 2 1 2 https://poedb.tw/us/Mageblood
Defiance of Destiny Paua Amulet 891.160000 1782320 2138784 1782320 1 1 1 https://poedb.tw/us/Defiance_of_Destiny
Reefbane Fishing Rod 851.240000 1702480 2042976 425620 1 4 4 https://poedb.tw/us/Reefbane
Replica Shroud of the Lightless Carnal Armour 791.780000 1583560 1900272 263926 2 3 6 https://poedb.tw/us/Replica_Shroud_of_the_Lightless
Stasis Prison Carnal Armour 791.780000 1583560 1900272 263926 2 3 6 https://poedb.tw/us/Stasis_Prison
The Squire Elegant Round Shield 768.720000 1537440 1844928 256240 2 3 6 https://poedb.tw/us/The_Squire
Rakiata's Dance Engraved Greatsword 768.720000 1537440 1844928 192180 2 4 8 https://poedb.tw/us/Rakiatas_Dance